#include <bits/stdc++.h>
using namespace std;
int t;
int main() {
    freopen("arena.in", "r", stdin);
    freopen("arena.out", "w", stdout);
    cin >> t;
    for (int i = 1; i <= t; i++){
        int n;
        cin >>n >> n;
    }
    cin >> t;
    for (int i = 1; i <= t; i++){
        cout << 0 << endl;
    }
    return 0;
}